<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<div th:replace="fragment/headFragment:: head"></div>
<body class="cbp-spmenu-push">
<div class="main-content">
    <!--left-fixed -navigation-->
    <div th:replace="fragment/left_sidebar:: left_sidebar"></div>
    <!--left-fixed -navigation-->
    <!-- header-starts -->
    <div th:replace="fragment/header_section :: header_section"></div>
    <!-- //header-ends -->
    <!-- main content start-->
    <div id="page-wrapper">
        <div class="main-page">
            <div class="panel-body widget-shadow">
            <form th:action="@{/roleManage/select}">
                输入id进行查询：
                <input name="roleid" type="number" oninput="if(value<=0)value=1">
                <input type="submit" value="查询">
            </form>
            <a th:href="@{/roleManage/add(current=${pagesCount},size=5)}"><button type="button">添加</button></a>

                <table class="table">
                    <thead>
                    <tr>
                        <th>id</th>
                        <th>角色名</th>
                        <th>角色数</th>
                        <th>说明</th>
                        <th>职责</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                        <tr th:each="rm , rowInfo : ${list}">
                            <th th:text="${rm.getRoleid()}">1</th>
                            <td th:text="${rm.getRolename()}">1328336954@qq.com</td>
                            <td th:text="${rm.rolecount}">1328336954@qq.com</td>
                            <td th:text="${rm.getRoledesc()}">李涛</td>
                            <td class="color-primary" th:text="${rm.getPower()}">15178562547</td>
                            <td>
                                <a th:href="@{/roleManage/update(roleid=${rm.getRoleid()},current=${#request.getParameter('current')},size=5)}">修改</a>
                                <a th:href="@{/roleManage/del(roleid=${rm.getRoleid()},current=${#request.getParameter('current')},size=5)}">删除</a>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <a th:href="@{/roleManage/index(current=1,size=5)}">首页</a>
                <a th:href="@{/roleManage/index(current=${i},size=5)}" th:each="i : ${#numbers.sequence(1,pagesCount)}"><span th:text="${i}" style="border: 1px solid #e3e3e3; height: 16px;width: 16px;text-align: center;vertical-align: middle;padding-left: 5px;padding-right: 5px;margin-left: 10px">1</span> </a>
                <a th:href="@{/roleManage/index(current=${pagesCount},size=5)}">尾页</a>
            </div>
        </div>
    </div>
    <!--footer-->
    <div class="footer">
        <p>Copyright &copy; 2021.Igeek All rights reserved.</p>
    </div>
    <!--//footer-->
</div>
<!-- Classie -->
<script src="js/classie.js"></script>
<script>
    var menuLeft = document.getElementById( 'cbp-spmenu-s1' ),
        showLeftPush = document.getElementById( 'showLeftPush' ),
        body = document.body;

    showLeftPush.onclick = function() {
        classie.toggle( this, 'active' );
        classie.toggle( body, 'cbp-spmenu-push-toright' );
        classie.toggle( menuLeft, 'cbp-spmenu-open' );
        disableOther( 'showLeftPush' );
    };


    function disableOther( button ) {
        if( button !== 'showLeftPush' ) {
            classie.toggle( showLeftPush, 'disabled' );
        }
    }
</script>
<!--scrolling js-->
<script src="js/jquery.nicescroll.js"></script>
<script src="js/scripts.js"></script>
<!--//scrolling js-->
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.js"> </script>
</body>
</html>